Conversation
Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
This reverts commit faf9bdf.
.../java/io/javaoperatorsdk/operator/baseapi/startsecondaryaccess/StartupSecondaryAccessIT.java
Show resolved
Hide resolved
Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
| * Used to initialize resources when the namespace is generated but the operator is not started | ||
| * yet. | ||
| */ | ||
| public Builder withBeforeStartHook(Consumer<LocallyRunOperatorExtension> beforeStartHook) { |
There was a problem hiding this comment.
Might need a "before-shutdown" hook as well to perform clean-up if needed.
There was a problem hiding this comment.
That is usually not needed strictly , since one can clean the resources at the end of the test, so functionally that is doable. But agree that might be a nicer api.
| SECONDARY_NUMBER); | ||
|
|
||
| if (secondary.size() != cached.size()) { | ||
| secondaryAndCacheSameAmount = false; |
There was a problem hiding this comment.
why not simply:
secondaryAndCacheSameAmount = secondary.size() == cache.size();There was a problem hiding this comment.
That would not work if later is the same value would overwrite the false, so here the aim is that if once false therefore always false
| } | ||
| }); | ||
|
|
||
| for (int i = 0; i < EXECUTION_NUMBER; i++) { |
There was a problem hiding this comment.
Yeah, this test was failing with a different version of the fix, and improved it while investigating, I can make it as a separate PR.
metacosm
left a comment
There was a problem hiding this comment.
LGTM with minor nitpicks.
Indexes all the resources in the cache on startup, making sure that all resources are on the index for first reconiliation.